package com.random.fox.whatspay;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;

import com.random.fox.whatspay.ui.MainAty;
import com.random.fox.whatspay.widget.TimeCircle;

/**
 * Created by 渠 on 2014/8/29.
 */
public class AppStart extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {

        requestWindowFeature(Window.FEATURE_NO_TITLE);

        TimeCircle view = new TimeCircle(this);

        setContentView(view);


        //渐变展示启动屏
        AlphaAnimation aa = new AlphaAnimation(0.3f,1.0f);
        aa.setDuration(2000);
        view.startAnimation(aa);
        aa.setAnimationListener(new Animation.AnimationListener()
        {
            @Override
            public void onAnimationEnd(Animation arg0) {
                Intent intent = new Intent(AppStart.this,MainAty.class);
                startActivity(intent);
                finish();
            }
            @Override
            public void onAnimationRepeat(Animation animation) {}
            @Override
            public void onAnimationStart(Animation animation) {}

        });
        super.onCreate(savedInstanceState);
    }
}
